# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-atom
_pkgname=atom
pkgver=0.4.3
pkgrel=5
pkgdesc='Memory efficient Python objects.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/atom/#files'
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('19f1048eea85782492b155aa149201f33628026f3ddcd6f1f71d7ef9cc8bd01a1a0750c38a344b6f420652493d6229984d054843f40f3ce29fd726684955e6b0')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf \
    "$pkgdir/usr/lib/python2.7/site-packages/tests" \
    "$pkgdir/usr/lib/python2.7/site-packages/atom/__init__.py" \
    "$pkgdir/usr/lib/python2.7/site-packages/atom/__init__.pyc"
}

